﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Media.Media3D;
using Ab3d;
using Ab3d.Visuals;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using SharpDX.Direct3D11;

namespace WpfApp3d.ViewModels
{
    public partial class TestViewModel : ObservableObject
    {
        [RelayCommand]
        public void ShowSlice(object obj)
        {
            var t = (ContentVisual3D)obj;

            var slices = t.Children.Where(s => s.GetName() == "slice").ToList();

            foreach (var item in slices)
            {
                if(item is ContentVisual3D cv)
                {
                    cv.IsVisible = false;
                }
            }
        }
    }
}
